1 About

1.1 Contributions

Please note that authorship is alphabetical. Contributions are listed below - see github for details and who to blame for what :-).

1.3 Citation

If you wish to refer to any of the material from this report please cite as:

  • Anderson, B., (2019) : , University of Southampton: Southampton, UK.

Report circulation:

  • Public

Report purpose:

This work is (c) 2019 the University of Southampton.

2 Introduction

# done in makefile

Data downloaded from http://southampton.my-air.uk. See also https://www.southampton.gov.uk/environmental-issues/pollution/air-quality/.

Southampton City Council collects various forms of air quality data at the sites shown in 2.1. WHO publishes information on the health consequences and “acceptable” exposure levels for each of these.

lDT <- data.table::melt(dt, id.vars = c("site", "obsDateTime"), measure.vars = c("co", 
    "nox", "nox2", "noxes", "oz", "pm10", "pm2_5", "so2"), value.name = "value"  # varies 
)

# remove NA
lDT <- lDT[!is.na(value)]

t <- lDT[, .(from = min(obsDateTime), to = max(obsDateTime), nObs = .N), keyby = .(site, 
    variable)]

kableExtra::kable(t, caption = "Dates data available by site and measure", digits = 2) %>% 
    kable_styling()
Table 2.1: Dates data available by site and measure
site variable from to nObs
Southampton - A33 Roadside AURN nox 2016-01-26 11:00:00 2019-12-04 22:00:00 33046
Southampton - A33 Roadside AURN nox2 2016-01-26 11:00:00 2019-12-04 22:00:00 33034
Southampton - A33 Roadside AURN pm10 2016-01-04 13:00:00 2019-12-04 21:00:00 31985
Southampton - Onslow Road nox 2016-01-01 00:00:00 2019-12-08 18:00:00 33223
Southampton - Onslow Road nox2 2016-01-01 00:00:00 2019-12-08 18:00:00 33219
Southampton - Onslow Road noxes 2016-01-01 00:00:00 2019-12-08 18:00:00 33223
Southampton - Victoria Road nox 2016-01-01 00:00:00 2019-06-21 08:00:00 25024
Southampton - Victoria Road nox2 2016-01-01 00:00:00 2019-06-21 08:00:00 25024
Southampton - Victoria Road noxes 2016-01-01 00:00:00 2019-06-21 08:00:00 25024
Southampton Background AURN nox 2016-01-01 00:00:00 2019-12-04 22:00:00 27948
Southampton Background AURN nox2 2016-01-01 00:00:00 2019-12-04 22:00:00 27961
Southampton Background AURN noxes 2016-01-01 00:00:00 2019-01-01 00:00:00 20026
Southampton Background AURN oz 2016-01-01 00:00:00 2019-12-04 22:00:00 27847
Southampton Background AURN pm10 2016-01-01 00:00:00 2019-12-04 22:00:00 24397
Southampton Background AURN pm2_5 2016-01-01 00:00:00 2019-12-04 22:00:00 26605
Southampton Background AURN so2 2016-01-01 00:00:00 2019-12-04 22:00:00 27399

3 Summarise data

Summarise previously downloaded and processed data…

skimr::skim(dt)
## Skim summary statistics
##  n obs: 209832 
##  n variables: 10 
## 
## ── Variable type:character ──────────────────────────────────────────────────────────────────────────────────────────────────────────
##  variable missing complete      n min max empty n_unique
##      site       0   209832 209832  22  31     0        6
## 
## ── Variable type:logical ────────────────────────────────────────────────────────────────────────────────────────────────────────────
##  variable missing complete      n mean  count
##        co  209832        0 209832  NaN 209832
## 
## ── Variable type:numeric ────────────────────────────────────────────────────────────────────────────────────────────────────────────
##  variable missing complete      n  mean    sd   p0  p25  p50  p75   p100
##       nox   90591   119241 209832 26.6  40.24 -5    4.7 13.3 32.1  746.3
##      nox2   90594   119238 209832 36.98 22.53 -1.3 20.5 33   48.8  287.5
##     noxes  131559    78273 209832 76.53 74.84 -1.4 32.8 56.9 94   1431.8
##        oz  181985    27847 209832 40.5  23.12 -0.2 23.9 41.2 56    174.1
##      pm10  153450    56382 209832 18.71 13.18 -3.5 10.9 15.8 23.1  761.6
##     pm2_5  183227    26605 209832 12.15  9.58 -4    6.6  9.5 14.4  289.2
##       so2  182433    27399 209832  3.01  3.36 -1.1  0.9  1.7  3.7   50.5
##      hist
##  ▇▁▁▁▁▁▁▁
##  ▇▆▁▁▁▁▁▁
##  ▇▁▁▁▁▁▁▁
##  ▆▇▇▂▁▁▁▁
##  ▇▁▁▁▁▁▁▁
##  ▇▁▁▁▁▁▁▁
##  ▇▁▁▁▁▁▁▁
## 
## ── Variable type:POSIXct ────────────────────────────────────────────────────────────────────────────────────────────────────────────
##     variable missing complete      n        min        max     median
##  obsDateTime       0   209832 209832 2016-01-01 2019-12-31 2017-12-30
##  n_unique
##     34972
t <- dt[, .(`co: Carbon Monoxide, mg/m3` = mean(co, na.rm = TRUE), `nox = Nitric Oxide, ug/m3` = mean(nox, 
    na.rm = TRUE), `nox2 = Nitrogen Dioxide, ug/m3` = mean(nox2, na.rm = TRUE), 
    `noxes = Oxides of Nitrogen, ug/m3` = mean(noxes, na.rm = TRUE), `oz = ozone, ug/m3` = mean(oz, 
        na.rm = TRUE), `pm10, ug/m3` = mean(pm10, na.rm = TRUE), `pm2_5, ug/m3` = mean(pm2_5, 
        na.rm = TRUE), `so2 = Sulphur Dioxide, ug/m3` = mean(so2, na.rm = TRUE)), 
    keyby = .(site)]

kableExtra::kable(t, caption = "Mean values per site (NaN indicates not measured)") %>% 
    kable_styling()
Table 3.1: Mean values per site (NaN indicates not measured)
site co: Carbon Monoxide, mg/m3 nox = Nitric Oxide, ug/m3 nox2 = Nitrogen Dioxide, ug/m3 noxes = Oxides of Nitrogen, ug/m3 oz = ozone, ug/m3 pm10, ug/m3 pm2_5, ug/m3 so2 = Sulphur Dioxide, ug/m3
Southampton - A33 Roadside AURN NaN 34.00597 35.79520 NaN NaN 19.04556 NaN NaN
Southampton - Bitterne NaN NaN NaN NaN NaN NaN NaN NaN
Southampton - Onslow Road NaN 29.85249 42.17603 87.94943 NaN NaN NaN NaN
Southampton - Redbridge NaN NaN NaN NaN NaN NaN NaN NaN
Southampton - Victoria Road NaN 27.41410 39.92920 81.96427 NaN NaN NaN NaN
Southampton Background AURN NaN 13.24819 29.55140 50.78906 40.50492 18.27441 12.15377 3.014884

Table 3.1 gives an indication of the availability of the different measures.

4 Analysis

In this section we present graphical analysis of the previoulsy downloaded data. Note this is just a snapshot of the data available.

4.1 Nitrogen Dioxide

yLab <- "Nitrogen Dioxide (ug/m3)"

t <- lDT[variable == "nox2", .(mean = mean(value, na.rm = TRUE), sd = sd(value, 
    na.rm = TRUE), min = min(value, na.rm = TRUE), max = max(value, na.rm = TRUE)), 
    keyby = .(site)]
kableExtra::kable(t, caption = "Summary of nox2 data") %>% kable_styling()
Table 4.1: Summary of nox2 data
site mean sd min max
Southampton - A33 Roadside AURN 35.79520 25.00895 0.0 164.3
Southampton - Onslow Road 42.17603 21.07799 1.2 241.3
Southampton - Victoria Road 39.92920 23.97378 -1.3 287.5
Southampton Background AURN 29.55140 16.94370 2.3 144.2

Table 4.1 suggests that there may be a few (5) negative values. These are summarised in 4.2 while Figure 4.1 shows the availability and levels of the pollutant data over time.

t <- head(dt[nox2 < 0], 10)
kableExtra::kable(t, caption = "Negative nox2 values (first 10)") %>% kable_styling()
Table 4.2: Negative nox2 values (first 10)
nox nox2 noxes pm10 site co oz pm2_5 so2 obsDateTime
0.4 -0.1 0.6 NA Southampton - Victoria Road NA NA NA NA 2016-01-29 04:00:00
0.8 -0.5 0.7 NA Southampton - Victoria Road NA NA NA NA 2016-11-27 05:00:00
0.9 -1.1 0.3 NA Southampton - Victoria Road NA NA NA NA 2016-11-27 06:00:00
1.5 -0.2 2.1 NA Southampton - Victoria Road NA NA NA NA 2017-02-06 00:00:00
1.1 -1.3 0.3 NA Southampton - Victoria Road NA NA NA NA 2017-02-06 01:00:00
t <- table(dt[nox < 0]$site)
kableExtra::kable(t, caption = "Negative nox2 values (count by site)") %>% kable_styling()
Table 4.2: Negative nox2 values (count by site)
Var1 Freq
Southampton - Onslow Road 248
Southampton - Victoria Road 166
# dt,xvar, yvar,fillVar, yLab
p <- makeTilePlot(lDT[variable == "nox2"], xVar = "obsDateTime", yVar = "site", 
    fillVar = "value", yLab = yLab)

p
Nitrogen Dioxide data availability and levels over time

Figure 4.1: Nitrogen Dioxide data availability and levels over time

# p <- ggplot2::ggplot(dt, aes(x = obsDateTime, y = nox2, colour = site,
# alpha = 0.1)) + geom_point(shape=4, size = 1)

t <- lDT[variable == "nox2" & value > 200][order(-value)]

kableExtra::kable(caption = paste0("Values greater than WHO threshold (NO2 > ", 
    hourlynox2Threshold_WHO, ")"), head(t, 10)) %>% kable_styling()
Table 4.3: Values greater than WHO threshold (NO2 > 200)
site obsDateTime variable value
Southampton - Victoria Road 2016-11-30 17:00:00 nox2 287.5
Southampton - Victoria Road 2016-11-30 19:00:00 nox2 275.3
Southampton - Victoria Road 2016-11-30 18:00:00 nox2 268.7
Southampton - Victoria Road 2017-01-05 18:00:00 nox2 251.6
Southampton - Victoria Road 2017-01-05 17:00:00 nox2 247.3
Southampton - Victoria Road 2017-01-24 18:00:00 nox2 243.5
Southampton - Victoria Road 2017-01-24 19:00:00 nox2 242.0
Southampton - Onslow Road 2016-03-08 09:00:00 nox2 241.3
Southampton - Victoria Road 2017-01-03 08:00:00 nox2 234.4
Southampton - Victoria Road 2017-01-03 09:00:00 nox2 232.8
p <- makeDotPlot(lDT[variable == "nox2"], xVar = "obsDateTime", yVar = "value", 
    byVar = "site", yLab = yLab)

p <- p + geom_hline(yintercept = hourlynox2Threshold_WHO) + labs(caption = "Reference line = WHO hourly guideline threshold")

if (doPlotly) {
    plotly::ggplotly(p)  # interactive
} else {
    p
}

Figure 4.2: Nitrogen Dioxide levels, Southampton (hourly)

Figure 4.2 shows hourly values for all sites. In the study period there were 23 hours when the hourly Nitrogen Dioxide level breached WHO guidelines. The worst 10 cases are shown in Table 4.3.

lDT[, obsDate := lubridate::date(obsDateTime)]

plotDT <- lDT[variable == "nox2", .(mean = mean(value, na.rm = TRUE)),
             keyby = .(obsDate, site)]

p <- makeDotPlot(plotDT, 
                 xVar = "obsDate", 
                 yVar = "mean", 
                 byVar = "site", 
                 yLab = yLab)

p <- p +
  geom_smooth() + # add smoothed line
  labs(caption = "Trend line = Generalized additive model (gam) with integrated smoothness estimation")

if(doPlotly){
  plotly::ggplotly(p) # interactive
} else {
  p
}

Figure 4.3: Nitrogen Dioxide levels, Southampton (daily mean

Figure 4.3 shows daily mean values for all sites over time and includes smoother trend lines for each site.

Clearly the mean daily values show less variance (and less extremes) than the hourly data and there has also been a decreasing trend over time.

4.2 PM 10

PM 10 data: has more sensors and wider coverage than PM2.5

yLab <- "PM 10 (ug/m3)"

t <- dt[, .(mean = mean(pm10, na.rm = TRUE), sd = sd(pm10, na.rm = TRUE), min = min(pm10, 
    na.rm = TRUE), max = max(pm10, na.rm = TRUE)), keyby = .(site)]
kableExtra::kable(t, caption = "Summary of pm10 data") %>% kable_styling()
Table 4.4: Summary of pm10 data
site mean sd min max
Southampton - A33 Roadside AURN 19.04556 14.36815 0.0 761.6
Southampton - Bitterne NaN NA Inf -Inf
Southampton - Onslow Road NaN NA Inf -Inf
Southampton - Redbridge NaN NA Inf -Inf
Southampton - Victoria Road NaN NA Inf -Inf
Southampton Background AURN 18.27441 11.42768 -3.5 344.1

Table 4.4 suggests that there may be a few (19) negative values. These are shown in 4.5 while 4.4 shows data availability and PM 10 levels over time at each site.

t <- head(dt[pm10 < 0], nrow(dt[pm10 < 0]))
kableExtra::kable(t, caption = "Negative PM10 values") %>% kable_styling()
Table 4.5: Negative PM10 values
nox nox2 noxes pm10 site co oz pm2_5 so2 obsDateTime
4.9 17.5 25.0 -0.9 Southampton Background AURN NA 48.7 -0.3 1.4 2016-04-16 10:00:00
3.1 15.1 19.8 -2.0 Southampton Background AURN NA 41.9 2.9 0.7 2016-06-12 06:00:00
5.7 15.3 24.0 -2.1 Southampton Background AURN NA 35.2 1.4 0.7 2016-06-12 07:00:00
1.0 8.6 10.1 -1.2 Southampton Background AURN NA 31.1 6.9 0.0 2017-06-11 03:00:00
5.0 13.4 21.0 -0.1 Southampton Background AURN NA 56.2 5.9 1.5 2017-06-30 11:00:00
1.1 11.2 12.9 -0.6 Southampton Background AURN NA 24.0 5.4 0.2 2017-07-04 02:00:00
7.9 12.6 24.8 -0.1 Southampton Background AURN NA 30.6 5.9 0.8 2017-07-26 12:00:00
1.0 4.6 6.2 -0.1 Southampton Background AURN NA 44.8 8.6 0.6 2017-08-17 03:00:00
7.6 23.2 34.9 -1.6 Southampton Background AURN NA 46.3 10.7 1.0 2017-08-18 15:00:00
7.5 18.8 30.3 -3.5 Southampton Background AURN NA 44.7 8.7 NA 2017-08-24 10:00:00
3.4 20.7 25.9 -1.1 Southampton Background AURN NA 48.6 8.5 0.9 2017-12-03 15:00:00
4.4 32.4 39.2 -1.2 Southampton Background AURN NA 34.6 2.5 0.7 2017-12-03 16:00:00
9.3 26.0 40.3 -0.4 Southampton Background AURN NA 57.4 2.9 2.0 2018-01-02 12:00:00
1.7 10.0 12.6 -1.4 Southampton Background AURN NA 25.0 6.1 0.9 2018-09-12 00:00:00
2.2 17.4 20.8 -0.8 Southampton Background AURN NA 54.1 2.3 3.5 2018-12-23 06:00:00
5.3 18.9 26.9 -0.2 Southampton Background AURN NA 43.9 5.6 1.3 2018-12-30 13:00:00
3.8 17.5 23.4 -1.5 Southampton Background AURN NA 45.6 4.9 1.1 2018-12-30 14:00:00
7.2 28.9 39.9 -0.1 Southampton Background AURN NA 37.8 6.0 1.3 2018-12-30 16:00:00
2.6 16.3 20.3 -1.0 Southampton Background AURN NA 52.9 6.0 1.0 2018-12-30 19:00:00
p <- makeTilePlot(lDT[variable == "pm10"], xVar = "obsDateTime", yVar = "site", 
    fillVar = "value", yLab = yLab)

p
Availability and level of PM 10 data over time

Figure 4.4: Availability and level of PM 10 data over time

Figure 4.5 shows hourly PM 10 values for all sites and suggests there may be an extreme outlier (see Table 4.5).

t <- lDT[variable == "pm10" & value > 100][order(-value)]

kableExtra::kable(caption = "Extreme hourly values (PM 10 > 100)", t) %>% kable_styling()
Table 4.6: Extreme hourly values (PM 10 > 100)
site obsDateTime variable value obsDate
Southampton - A33 Roadside AURN 2016-09-19 14:00:00 pm10 761.6 2016-09-19
Southampton - A33 Roadside AURN 2016-08-09 14:00:00 pm10 402.7 2016-08-09
Southampton Background AURN 2016-01-01 00:00:00 pm10 344.1 2016-01-01
Southampton - A33 Roadside AURN 2017-05-05 01:00:00 pm10 336.4 2017-05-05
Southampton - A33 Roadside AURN 2016-08-09 15:00:00 pm10 328.0 2016-08-09
Southampton - A33 Roadside AURN 2016-08-09 04:00:00 pm10 300.1 2016-08-09
Southampton - A33 Roadside AURN 2016-09-19 13:00:00 pm10 290.7 2016-09-19
Southampton - A33 Roadside AURN 2017-06-19 04:00:00 pm10 264.5 2017-06-19
Southampton Background AURN 2019-10-27 20:00:00 pm10 252.5 2019-10-27
Southampton - A33 Roadside AURN 2016-11-30 04:00:00 pm10 230.3 2016-11-30
Southampton - A33 Roadside AURN 2017-06-19 08:00:00 pm10 214.4 2017-06-19
Southampton - A33 Roadside AURN 2017-06-18 20:00:00 pm10 212.0 2017-06-18
Southampton - A33 Roadside AURN 2016-11-30 06:00:00 pm10 201.6 2016-11-30
Southampton - A33 Roadside AURN 2017-04-14 12:00:00 pm10 196.1 2017-04-14
Southampton - A33 Roadside AURN 2016-11-30 03:00:00 pm10 195.8 2016-11-30
Southampton - A33 Roadside AURN 2017-06-18 19:00:00 pm10 186.6 2017-06-18
Southampton - A33 Roadside AURN 2017-04-13 21:00:00 pm10 186.1 2017-04-13
Southampton - A33 Roadside AURN 2016-08-09 05:00:00 pm10 178.9 2016-08-09
Southampton - A33 Roadside AURN 2016-08-09 13:00:00 pm10 176.6 2016-08-09
Southampton - A33 Roadside AURN 2017-05-05 00:00:00 pm10 176.1 2017-05-05
Southampton Background AURN 2019-12-02 19:00:00 pm10 174.6 2019-12-02
Southampton - A33 Roadside AURN 2017-05-05 07:00:00 pm10 170.0 2017-05-05
Southampton Background AURN 2019-10-27 19:00:00 pm10 162.2 2019-10-27
Southampton - A33 Roadside AURN 2017-06-19 05:00:00 pm10 160.3 2017-06-19
Southampton - A33 Roadside AURN 2017-05-02 20:00:00 pm10 159.0 2017-05-02
Southampton - A33 Roadside AURN 2017-06-19 07:00:00 pm10 158.7 2017-06-19
Southampton - A33 Roadside AURN 2017-06-19 03:00:00 pm10 155.5 2017-06-19
Southampton - A33 Roadside AURN 2016-08-09 07:00:00 pm10 154.7 2016-08-09
Southampton - A33 Roadside AURN 2017-05-05 06:00:00 pm10 153.8 2017-05-05
Southampton Background AURN 2016-01-01 01:00:00 pm10 149.6 2016-01-01
Southampton - A33 Roadside AURN 2017-05-05 14:00:00 pm10 149.2 2017-05-05
Southampton - A33 Roadside AURN 2017-06-19 06:00:00 pm10 149.0 2017-06-19
Southampton - A33 Roadside AURN 2016-11-30 05:00:00 pm10 146.1 2016-11-30
Southampton - A33 Roadside AURN 2017-05-05 11:00:00 pm10 136.9 2017-05-05
Southampton - A33 Roadside AURN 2016-08-09 09:00:00 pm10 133.3 2016-08-09
Southampton - A33 Roadside AURN 2017-05-04 22:00:00 pm10 132.2 2017-05-04
Southampton - A33 Roadside AURN 2017-06-19 02:00:00 pm10 132.2 2017-06-19
Southampton - A33 Roadside AURN 2016-08-09 06:00:00 pm10 130.3 2016-08-09
Southampton - A33 Roadside AURN 2017-05-05 02:00:00 pm10 129.4 2017-05-05
Southampton - A33 Roadside AURN 2017-06-18 21:00:00 pm10 126.7 2017-06-18
Southampton - A33 Roadside AURN 2016-08-09 03:00:00 pm10 125.7 2016-08-09
Southampton - A33 Roadside AURN 2016-03-08 11:00:00 pm10 125.3 2016-03-08
Southampton - A33 Roadside AURN 2017-12-02 10:00:00 pm10 122.3 2017-12-02
Southampton - A33 Roadside AURN 2017-05-05 04:00:00 pm10 120.9 2017-05-05
Southampton - A33 Roadside AURN 2017-12-05 07:00:00 pm10 120.9 2017-12-05
Southampton - A33 Roadside AURN 2017-04-13 19:00:00 pm10 120.4 2017-04-13
Southampton - A33 Roadside AURN 2017-10-18 15:00:00 pm10 120.0 2017-10-18
Southampton - A33 Roadside AURN 2016-02-16 10:00:00 pm10 119.8 2016-02-16
Southampton Background AURN 2017-11-02 19:00:00 pm10 119.1 2017-11-02
Southampton - A33 Roadside AURN 2016-03-08 08:00:00 pm10 115.5 2016-03-08
Southampton - A33 Roadside AURN 2016-03-12 10:00:00 pm10 114.7 2016-03-12
Southampton Background AURN 2019-12-02 18:00:00 pm10 114.3 2019-12-02
Southampton - A33 Roadside AURN 2016-07-25 14:00:00 pm10 111.2 2016-07-25
Southampton - A33 Roadside AURN 2017-01-19 18:00:00 pm10 110.6 2017-01-19
Southampton - A33 Roadside AURN 2017-10-18 16:00:00 pm10 110.2 2017-10-18
Southampton - A33 Roadside AURN 2016-08-09 11:00:00 pm10 109.9 2016-08-09
Southampton - A33 Roadside AURN 2016-02-25 08:00:00 pm10 109.7 2016-02-25
Southampton - A33 Roadside AURN 2017-06-16 09:00:00 pm10 109.6 2017-06-16
Southampton Background AURN 2017-12-20 00:00:00 pm10 109.3 2017-12-20
Southampton - A33 Roadside AURN 2016-11-30 07:00:00 pm10 109.1 2016-11-30
Southampton Background AURN 2019-12-02 21:00:00 pm10 109.1 2019-12-02
Southampton - A33 Roadside AURN 2017-01-22 11:00:00 pm10 108.9 2017-01-22
Southampton - A33 Roadside AURN 2016-09-19 15:00:00 pm10 107.9 2016-09-19
Southampton - A33 Roadside AURN 2016-03-12 09:00:00 pm10 107.0 2016-03-12
Southampton - A33 Roadside AURN 2018-07-06 04:00:00 pm10 106.4 2018-07-06
Southampton - A33 Roadside AURN 2016-03-12 11:00:00 pm10 105.4 2016-03-12
Southampton - A33 Roadside AURN 2016-02-19 10:00:00 pm10 105.2 2016-02-19
Southampton Background AURN 2017-11-02 20:00:00 pm10 105.2 2017-11-02
Southampton - A33 Roadside AURN 2017-01-05 12:00:00 pm10 104.8 2017-01-05
Southampton - A33 Roadside AURN 2017-12-02 11:00:00 pm10 104.8 2017-12-02
Southampton - A33 Roadside AURN 2017-10-18 14:00:00 pm10 104.6 2017-10-18
Southampton Background AURN 2017-12-19 23:00:00 pm10 104.4 2017-12-19
Southampton Background AURN 2019-03-29 22:00:00 pm10 102.8 2019-03-29
Southampton - A33 Roadside AURN 2018-02-08 10:00:00 pm10 102.5 2018-02-08
Southampton - A33 Roadside AURN 2018-07-05 09:00:00 pm10 101.8 2018-07-05
Southampton - A33 Roadside AURN 2018-07-06 05:00:00 pm10 101.8 2018-07-06
Southampton - A33 Roadside AURN 2016-11-30 16:00:00 pm10 100.3 2016-11-30
Southampton - A33 Roadside AURN 2017-01-19 17:00:00 pm10 100.1 2017-01-19
p <- makeDotPlot(lDT[variable == "pm10"], xVar = "obsDateTime", yVar = "value", 
    byVar = "site", yLab = yLab)


if (doPlotly) {
    plotly::ggplotly(p)  # interactive
} else {
    p
}

Figure 4.5: PM10 levels, Southampton (hourly)

pm10DT <- dt[!is.na(pm10)]
plotDT <- lDT[variable == "pm10", .(mean = mean(value, na.rm = TRUE)),
             keyby = .(obsDate, site)]

t <- plotDT[mean > dailyPm10Threshold_WHO][order(-mean)]

kableExtra::kable(caption = paste0("Values greater than WHO threshold (PM 10 > ", 
                                   dailyPm10Threshold_WHO , ")"), 
                  digits = 2,
                  t) %>%
  kable_styling()
Table 4.7: Values greater than WHO threshold (PM 10 > 50)
obsDate site mean
2016-08-09 Southampton - A33 Roadside AURN 144.48
2017-06-19 Southampton - A33 Roadside AURN 143.66
2017-05-05 Southampton - A33 Roadside AURN 88.94
2016-09-19 Southampton - A33 Roadside AURN 88.46
2016-11-30 Southampton - A33 Roadside AURN 79.25
2016-03-12 Southampton - A33 Roadside AURN 72.00
2017-01-22 Southampton - A33 Roadside AURN 66.86
2019-02-27 Southampton Background AURN 64.67
2019-02-27 Southampton - A33 Roadside AURN 60.60
2019-04-17 Southampton Background AURN 58.37
2016-12-01 Southampton - A33 Roadside AURN 54.81
2017-01-26 Southampton - A33 Roadside AURN 53.90
2019-03-29 Southampton Background AURN 53.69
2017-12-19 Southampton Background AURN 53.66
2016-12-06 Southampton - A33 Roadside AURN 53.45
2019-04-17 Southampton - A33 Roadside AURN 53.09
2019-04-07 Southampton Background AURN 52.94
2018-04-21 Southampton Background AURN 52.32
2019-03-30 Southampton Background AURN 51.66
2019-04-22 Southampton Background AURN 50.86
2019-02-23 Southampton Background AURN 50.22
p <- makeDotPlot(plotDT, 
                 xVar = "obsDate", 
                 yVar = "mean", 
                 byVar = "site", 
                 yLab = yLab)

p <- p + 
  geom_hline(yintercept = dailyPm10Threshold_WHO) +
  geom_smooth() + # add smoothed line
  labs(caption = "Trend line = Generalized additive model (gam) with integrated smoothness estimation")


if(doPlotly){
  plotly::ggplotly(p) # interactive
} else {
  p
}

Figure 4.6: PM10 levels, Southampton (daily mean, WHO daily threshold shown in red - use mouse to hover over data)

Figure 4.6 shows daily values for all sites and indicates the 21 that cross the WHO PM10 daily mean exposure threshold (50) - see Table 4.7.

4.3 PM 2.5

yLab <- "PM 2.5 (ug/m3)"

t <- dt[, .(mean = mean(pm2_5, na.rm = TRUE), sd = sd(pm2_5, na.rm = TRUE), 
    min = min(pm2_5, na.rm = TRUE), max = max(pm2_5, na.rm = TRUE)), keyby = .(site)]
kableExtra::kable(t, caption = "Summary of pm2_5 data") %>% kable_styling()
Table 4.8: Summary of pm2_5 data
site mean sd min max
Southampton - A33 Roadside AURN NaN NA Inf -Inf
Southampton - Bitterne NaN NA Inf -Inf
Southampton - Onslow Road NaN NA Inf -Inf
Southampton - Redbridge NaN NA Inf -Inf
Southampton - Victoria Road NaN NA Inf -Inf
Southampton Background AURN 12.15377 9.584743 -4 289.2

Table 4.8 suggests that there may be a few (89) negative values. These are shown in 4.9 while 4.7 shows data availability and PM 2.5 levels over time at each site.

t <- head(dt[pm2_5 < 0], nrow(dt[pm2_5 < 0]))
kableExtra::kable(t, caption = "Negative pm2_5 values") %>% kable_styling()
Table 4.9: Negative pm2_5 values
nox nox2 noxes pm10 site co oz pm2_5 so2 obsDateTime
41.8 55.2 119.2 5.8 Southampton Background AURN NA 16.8 -0.8 4.5 2016-01-02 17:00:00
2.5 26.4 30.1 12.6 Southampton Background AURN NA 48.1 -0.9 0.2 2016-01-04 03:00:00
2.9 24.2 28.6 11.7 Southampton Background AURN NA 44.0 -0.3 0.8 2016-01-04 23:00:00
1.0 15.7 17.3 9.1 Southampton Background AURN NA 49.8 -1.0 1.1 2016-01-05 01:00:00
2.5 14.5 18.3 7.8 Southampton Background AURN NA 69.5 -0.3 4.6 2016-01-09 22:00:00
3.5 18.2 23.6 5.6 Southampton Background AURN NA 60.8 -0.9 4.9 2016-01-09 23:00:00
1.3 5.2 7.2 13.3 Southampton Background AURN NA 69.6 -0.5 1.4 2016-01-10 03:00:00
1.4 35.7 37.8 3.0 Southampton Background AURN NA 36.6 -0.7 2.3 2016-01-14 04:00:00
6.3 48.0 57.6 3.1 Southampton Background AURN NA 26.0 -0.7 2.5 2016-01-14 05:00:00
3.9 16.2 22.1 2.4 Southampton Background AURN NA 54.2 -2.0 2.3 2016-01-14 14:00:00
0.0 3.5 3.5 6.1 Southampton Background AURN NA 70.6 -0.6 2.3 2016-01-27 01:00:00
0.2 4.0 4.4 7.6 Southampton Background AURN NA 70.1 -0.2 2.2 2016-01-27 03:00:00
0.7 5.7 6.8 7.8 Southampton Background AURN NA 68.7 -0.5 2.4 2016-01-27 04:00:00
5.9 18.2 27.3 7.5 Southampton Background AURN NA 57.5 -0.9 2.9 2016-01-27 07:00:00
7.4 19.7 31.0 7.9 Southampton Background AURN NA 56.0 -2.3 3.0 2016-01-27 08:00:00
6.3 19.1 28.9 4.7 Southampton Background AURN NA 55.2 -1.0 3.4 2016-01-27 10:00:00
6.8 18.2 28.6 7.0 Southampton Background AURN NA 57.2 -1.5 3.4 2016-01-27 11:00:00
6.7 18.7 28.9 3.1 Southampton Background AURN NA 57.4 -0.7 3.8 2016-01-27 13:00:00
NA NA NA 13.7 Southampton Background AURN NA 71.6 -0.4 0.5 2016-01-29 02:00:00
2.0 32.3 35.4 NA Southampton Background AURN NA 49.6 -0.9 1.7 2016-01-30 04:00:00
1.4 22.1 24.4 NA Southampton Background AURN NA 53.0 -0.3 1.5 2016-01-30 05:00:00
2.6 16.7 20.6 4.3 Southampton Background AURN NA 61.2 -0.6 2.0 2016-01-31 09:00:00
11.1 44.1 61.1 7.9 Southampton Background AURN NA 29.6 -2.1 2.8 2016-01-31 11:00:00
15.6 51.5 75.4 6.5 Southampton Background AURN NA 21.3 -0.5 2.4 2016-01-31 12:00:00
19.0 52.3 81.5 1.9 Southampton Background AURN NA 20.0 -0.3 2.6 2016-01-31 13:00:00
4.2 18.3 24.7 4.0 Southampton Background AURN NA 46.1 -1.4 1.9 2016-01-31 17:00:00
3.2 26.4 31.3 NA Southampton Background AURN NA 60.5 -2.1 5.4 2016-02-06 22:00:00
3.7 20.9 26.5 8.1 Southampton Background AURN NA 51.5 -0.6 2.0 2016-02-19 23:00:00
3.6 35.3 40.7 0.7 Southampton Background AURN NA 37.6 -1.0 1.4 2016-02-20 01:00:00
2.9 25.7 30.2 2.9 Southampton Background AURN NA 48.4 -0.7 1.1 2016-02-21 00:00:00
3.5 12.5 17.8 2.6 Southampton Background AURN NA 58.0 -0.9 1.1 2016-02-21 09:00:00
1.5 25.6 27.9 2.2 Southampton Background AURN NA 47.0 -0.4 1.9 2016-02-22 03:00:00
9.7 42.9 57.7 3.5 Southampton Background AURN NA 32.5 -0.7 2.1 2016-02-22 06:00:00
0.6 11.2 12.2 3.5 Southampton Background AURN NA 59.7 -0.1 3.6 2016-03-04 03:00:00
1.9 24.7 27.5 3.9 Southampton Background AURN NA 46.1 -0.2 3.7 2016-03-04 04:00:00
19.0 36.3 65.4 7.2 Southampton Background AURN NA 45.5 -0.4 4.9 2016-03-04 13:00:00
6.3 24.4 34.1 NA Southampton Background AURN NA 42.7 -1.1 4.7 2016-03-09 11:00:00
1.8 28.2 31.0 2.6 Southampton Background AURN NA 41.8 -1.0 1.9 2016-03-25 03:00:00
0.5 12.4 13.2 3.6 Southampton Background AURN NA 48.8 -0.2 1.3 2016-03-25 04:00:00
4.6 35.7 42.8 5.1 Southampton Background AURN NA 44.4 -0.7 4.5 2016-03-26 23:00:00
2.1 14.1 17.4 1.0 Southampton Background AURN NA 65.2 -1.1 6.3 2016-03-28 05:00:00
5.0 35.8 43.4 2.1 Southampton Background AURN NA 48.8 -1.5 3.6 2016-03-28 17:00:00
1.0 7.5 9.0 5.8 Southampton Background AURN NA 68.9 -0.8 1.9 2016-04-09 03:00:00
1.1 15.8 17.5 7.1 Southampton Background AURN NA 56.0 -0.9 2.1 2016-04-09 05:00:00
5.4 17.1 25.3 3.8 Southampton Background AURN NA 47.7 -1.0 1.9 2016-04-16 09:00:00
4.9 17.5 25.0 -0.9 Southampton Background AURN NA 48.7 -0.3 1.4 2016-04-16 10:00:00
6.7 19.2 29.5 5.6 Southampton Background AURN NA 48.7 -0.4 1.2 2016-04-16 12:00:00
4.6 16.1 23.1 2.4 Southampton Background AURN NA 60.8 -1.1 1.3 2016-04-17 12:00:00
7.4 25.7 37.0 10.8 Southampton Background AURN NA 51.4 -0.5 1.7 2016-04-29 17:00:00
13.1 44.3 64.3 13.7 Southampton Background AURN NA 13.6 -1.2 1.6 2016-05-03 05:00:00
0.7 5.7 6.7 NA Southampton Background AURN NA 28.2 -0.2 0.9 2016-06-20 01:00:00
10.7 14.1 30.5 NA Southampton Background AURN NA 22.9 -1.0 1.2 2016-06-20 05:00:00
6.6 31.8 41.9 2.2 Southampton Background AURN NA 61.6 -1.2 1.8 2017-02-03 19:00:00
2.5 21.9 25.6 3.9 Southampton Background AURN NA 76.7 -0.3 1.3 2017-02-26 23:00:00
0.7 22.4 23.4 2.8 Southampton Background AURN NA 82.1 -0.2 0.5 2017-02-27 01:00:00
1.7 19.7 22.4 10.3 Southampton Background AURN NA 71.4 -1.1 0.5 2017-03-04 02:00:00
1.4 18.2 20.3 6.9 Southampton Background AURN NA 75.5 -0.3 5.3 2017-03-05 07:00:00
3.1 24.8 29.5 4.6 Southampton Background AURN NA 52.3 -0.4 0.7 2017-03-08 05:00:00
0.5 4.2 5.0 6.9 Southampton Background AURN NA 84.7 -0.5 0.8 2017-03-20 04:00:00
3.5 11.0 16.4 NA Southampton Background AURN NA 72.1 -1.5 0.5 2017-04-25 12:00:00
NA NA NA NA Southampton Background AURN NA NA -0.7 1.3 2017-05-17 13:00:00
5.0 17.4 25.1 2.8 Southampton Background AURN NA 35.8 -0.9 0.7 2017-10-01 14:00:00
0.6 4.6 5.5 4.0 Southampton Background AURN NA 79.5 -0.2 1.6 2017-10-21 00:00:00
2.8 25.0 29.2 3.5 Southampton Background AURN NA 43.8 -0.7 0.3 2017-11-23 22:00:00
2.2 12.1 15.4 13.2 Southampton Background AURN NA 53.3 -0.1 0.6 2017-11-26 23:00:00
4.3 21.2 27.8 13.2 Southampton Background AURN NA 39.4 -1.4 0.9 2017-12-03 10:00:00
4.4 29.8 36.4 9.3 Southampton Background AURN NA 45.3 -3.7 0.7 2017-12-24 07:00:00
3.4 19.9 25.2 7.5 Southampton Background AURN NA 54.0 -0.7 1.0 2017-12-24 09:00:00
6.2 30.6 40.1 14.2 Southampton Background AURN NA 48.1 -0.4 1.7 2017-12-24 16:00:00
2.4 15.8 19.4 13.5 Southampton Background AURN NA 62.9 -3.8 1.6 2017-12-24 20:00:00
9.4 16.5 30.9 15.0 Southampton Background AURN NA 55.0 -0.4 1.5 2017-12-25 08:00:00
0.8 6.2 7.5 2.7 Southampton Background AURN NA 72.4 -0.6 4.0 2017-12-25 21:00:00
2.1 25.9 29.1 3.9 Southampton Background AURN NA 54.3 -0.8 3.7 2017-12-25 23:00:00
1.4 25.9 28.0 5.8 Southampton Background AURN NA 50.9 -0.2 0.8 2017-12-26 03:00:00
1.3 23.2 25.2 5.0 Southampton Background AURN NA 50.4 -1.4 0.5 2017-12-26 04:00:00
1.2 19.7 21.5 20.3 Southampton Background AURN NA 61.8 -3.5 4.5 2017-12-27 01:00:00
4.0 17.8 24.1 18.0 Southampton Background AURN NA 78.3 -0.6 1.5 2017-12-29 13:00:00
2.4 13.0 16.7 5.6 Southampton Background AURN NA 66.2 -3.0 1.8 2018-01-01 13:00:00
1.2 8.4 10.2 17.4 Southampton Background AURN NA 71.7 -2.9 1.7 2018-01-01 14:00:00
21.2 60.4 93.0 18.4 Southampton Background AURN NA 25.0 -0.9 1.4 2018-01-05 15:00:00
5.2 16.0 24.0 5.4 Southampton Background AURN NA 68.3 -4.0 1.3 2018-01-15 07:00:00
12.9 43.2 63.0 5.4 Southampton Background AURN NA 43.9 -0.8 1.1 2018-01-18 14:00:00
14.3 47.5 69.4 7.7 Southampton Background AURN NA 37.6 -0.9 0.9 2018-01-18 15:00:00
2.1 24.2 27.4 5.5 Southampton Background AURN NA 54.4 -1.8 0.8 2018-01-28 07:00:00
3.0 10.9 15.5 11.1 Southampton Background AURN NA 26.4 -1.4 0.8 2018-08-24 04:00:00
6.2 16.5 26.1 7.1 Southampton Background AURN NA 20.2 -2.0 0.5 2018-08-25 05:00:00
2.3 13.3 16.9 13.2 Southampton Background AURN NA 23.0 -1.9 0.4 2018-09-07 04:00:00
4.8 16.4 23.7 8.6 Southampton Background AURN NA 35.9 -0.9 0.8 2018-10-27 07:00:00
0.9 6.1 7.5 7.0 Southampton Background AURN NA 74.0 -1.7 0.2 2018-12-07 02:00:00
p <- makeTilePlot(lDT[variable == "pm2_5"], xVar = "obsDateTime", yVar = "site", 
    fillVar = "value", yLab = yLab)

p
Availability and level of PM 10 data over time

Figure 4.7: Availability and level of PM 10 data over time

Figure 4.8 shows hourly values for all sites.

t <- lDT[variable == "pm2_5" & value > 200][order(-value)]

kableExtra::kable(caption = "Extreme hourly values (PM 2.5 > 50)", t) %>% kable_styling()
Table 4.10: Extreme hourly values (PM 2.5 > 50)
site obsDateTime variable value obsDate
Southampton Background AURN 2016-01-01 00:00:00 pm2_5 289.2 2016-01-01
Southampton Background AURN 2019-10-27 20:00:00 pm2_5 239.1 2019-10-27
p <- makeDotPlot(lDT[variable == "pm2_5"], xVar = "obsDateTime", yVar = "value", 
    byVar = "site", yLab = yLab)


if (doPlotly) {
    plotly::ggplotly(p)  # interactive
} else {
    p
}

Figure 4.8: PM2_5 levels, Southampton (hourly - use mouse to hover over data)

plotDT <- lDT[variable == "pm2_5", .(mean = mean(value, na.rm = TRUE)),
             keyby = .(obsDate, site)]

t <- plotDT[mean > dailyPm2.5Threshold_WHO][order(-mean)]

kableExtra::kable(caption = paste0("Top 10 values greater than WHO threshold (PM 2.5 > ", 
                                   dailyPm2.5Threshold_WHO , ")"), 
                  digits = 2,
                  head(t,10)) %>%
  kable_styling()
Table 4.11: Top 10 values greater than WHO threshold (PM 2.5 > 25)
obsDate site mean
2016-03-12 Southampton Background AURN 64.79
2019-04-17 Southampton Background AURN 49.04
2016-03-13 Southampton Background AURN 47.79
2019-04-07 Southampton Background AURN 46.90
2019-02-27 Southampton Background AURN 43.64
2019-03-29 Southampton Background AURN 43.60
2019-04-22 Southampton Background AURN 42.92
2017-02-12 Southampton Background AURN 42.25
2018-04-21 Southampton Background AURN 41.96
2016-03-11 Southampton Background AURN 41.80
p <- makeDotPlot(plotDT, 
                 xVar = "obsDate", 
                 yVar = "mean", 
                 byVar = "site", 
                 yLab = yLab)

p <- p + 
  geom_hline(yintercept = dailyPm2.5Threshold_WHO) +
  geom_smooth() + #add smoothed line
  labs(caption = "Trend line = Generalized additive model (gam) with integrated smoothness estimation")


if(doPlotly){
  plotly::ggplotly(p) # interactive
} else {
  p
}

Figure 4.9: PM2_5 levels, Southampton (daily mean)

Figure 4.9 shows daily values for all sites and indicates that the WHO PM2_5 daily mean exposure threshold (25) was breached on 80 days. The 10 worst cases are shown in Table 4.11.

5 Observations

  • Nitorgen Dioxide levels appear to be trending downwards
  • For particulates the trend is more complex with PM10 trending down but PM2.5 trending up.
    • Something happened on the 27th October 2019 at 20:00. There are spikes on all hourly plots (although this is masked in the daily plots). Could it have been a cruise ship leaving?
    • Something else happened on the 2nd December 2019 at 21:00. Was this another ship?

6 Runtime

Report generated using knitr in RStudio with R version 3.5.2 (2018-12-20) running on x86_64-apple-darwin15.6.0 (Darwin Kernel Version 17.7.0: Fri Oct 4 23:08:59 PDT 2019; root:xnu-4570.71.57~1/RELEASE_X86_64).

t <- proc.time() - startTime

elapsed <- t[[3]]

Analysis completed in 39.126 seconds ( 0.65 minutes).

R packages used:

  • data.table - (Dowle et al. 2015)
  • ggplot2 - (Wickham 2009)
  • here - (Müller 2017)
  • kableExtra - (Zhu 2018)
  • lubridate - (Grolemund and Wickham 2011)
  • plotly - (Sievert et al. 2016)
  • skimr - (Arino de la Rubia et al. 2017)

References

Arino de la Rubia, Eduardo, Hao Zhu, Shannon Ellis, Elin Waring, and Michael Quinn. 2017. Skimr: Skimr. https://github.com/ropenscilabs/skimr.

Dowle, M, A Srinivasan, T Short, S Lianoglou with contributions from R Saporta, and E Antonyan. 2015. Data.table: Extension of Data.frame. https://CRAN.R-project.org/package=data.table.

Grolemund, Garrett, and Hadley Wickham. 2011. “Dates and Times Made Easy with lubridate.” Journal of Statistical Software 40 (3): 1–25. http://www.jstatsoft.org/v40/i03/.

Müller, Kirill. 2017. Here: A Simpler Way to Find Your Files. https://CRAN.R-project.org/package=here.

Sievert, Carson, Chris Parmer, Toby Hocking, Scott Chamberlain, Karthik Ram, Marianne Corvellec, and Pedro Despouy. 2016. Plotly: Create Interactive Web Graphics via ’Plotly.js’. https://CRAN.R-project.org/package=plotly.

Wickham, Hadley. 2009. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. http://ggplot2.org.

Zhu, Hao. 2018. KableExtra: Construct Complex Table with ’Kable’ and Pipe Syntax. https://CRAN.R-project.org/package=kableExtra.